layui.use(['form','layer','table','laydate'],function(){
    $ = layui.jquery;
    var layer = layui.layer ,table = layui.table,laydate = layui.laydate,form = layui.form;
    //第一个实例
    table.render({
        elem: '#demo'
        ,id:'tabuser'
        ,height: "auto"
        ,method:"post"
        ,url:baseUrl+"consoleuser/getlogin" //数据接口
        ,request: {
            pageName: 'pageNum' //页码的参数名称，默认：page
            ,limitName: 'pageSize' //每页数据量的参数名，默认：limit
        }
        ,page: true //开启分页
        ,cols: [[ //表头
            {field: 'id', title: 'ID',align:'center',fixed: 'left',width:100,sort:true}
            ,{field: 'userName', title: '用户名',align:'center',sort:true}
            ,{field: 'ip', title: 'IP',align:'center',sort:true}
            ,{field: 'address', title: '地址',align:'center',sort:true}
            ,{field: 'createTime', title: '时间',align:'center',sort:true, toolbar: '#createTime'}

        ]]
    });
})


